function ret=simplify1(str)
 l=length(str);
 l1=l-1;
 while(l1<l) 
  l=length(str);
 str=strrep(str,"HH","");
  str=strrep(str,"tT","");
  str=strrep(str,"Tt","");
  l1=length(str);
 endwhile
 ret=str;
endfunction
